import request from '@/utils/request'

// 查询收件人列表
export function listRecipient(query) {
  return request({
    url: '/system/recipient/list',
    method: 'get',
    params: query
  })
}

// 查询收件人详细
export function getRecipient(id) {
  return request({
    url: '/system/recipient/' + id,
    method: 'get'
  })
}

// 新增收件人
export function addRecipient(data) {
  return request({
    url: '/system/recipient',
    method: 'post',
    data: data
  })
}

// 修改收件人
export function updateRecipient(data) {
  return request({
    url: '/system/recipient',
    method: 'put',
    data: data
  })
}

// 删除收件人
export function delRecipient(id) {
  return request({
    url: '/system/recipient/' + id,
    method: 'delete'
  })
}
